<template>
  <div>
    {{str}} <br>
    <button @click="f">A组件点击</button>
  </div>
</template>

<script setup>
import {ref, reactive} from "vue"
import  emitter from '../plugins/Bus.ts'
let str=ref('A组件的数据')
function f() {
  console.log('f()');
  emitter.emit('fn' ,str.value);
}
</script>

<style scoped>

</style>